package com.es.controller;

import com.es.entity.Student;
import com.es.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class StudentController {
    @Autowired
    private StudentService service;

    public void save() {
        Student student = new Student();
        student.setName("王照智");
        service.save(student);
    }

    public void update(){
        Student student = new Student();
        student.setId(8);
        student.setName("李健");
        service.update(student);
    }
}
